/*
 * 	SCR#243: Avoid Zero Cost Services
 */
UPDATE ServiceParam SET Price=0.01 WHERE Price=0
UPDATE ServiceParam SET Duration=5 WHERE Duration=0

ALTER TABLE ServiceParam WITH NOCHECK 
ADD CONSTRAINT ServiceParam_Price_Check CHECK (Price > 0)
GO

ALTER TABLE ServiceParam WITH NOCHECK 
ADD CONSTRAINT ServiceParam_Duration_Check CHECK (Duration > 0)
GO

/*
 * 	SCR#254: Add Check for Staff Holiday's Duration to Avoid Empty Holidays
 */
UPDATE Schedule SET FinishTime=FinishTime+5 WHERE StartTime=FinishTime
GO
ALTER TABLE Schedule WITH NOCHECK 
ADD CONSTRAINT Schedule_Duration_Check CHECK (StartTime<FinishTime)
GO

/*
 * 	SCR#253: Activate/Deactivate Employee
 */
 UPDATE Employee SET IsAttendant=1 WHERE Sys=0


 